package com.example.demo.app;

import com.example.demo.domain.base.BaseResult;
import com.example.demo.domain.base.PageParam;
import com.example.demo.domain.base.PageResult;
import com.example.demo.domain.entity.NoticeDO;
import com.example.demo.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 消息
 *
 * @author haochen78
 * @date 2025/11/7 15:28
 **/
@RestController
@RequestMapping("/app/notice")
public class NoticeController {

    @Autowired
    private NoticeService noticeService;

    @PostMapping("/list")
    public BaseResult<PageResult<NoticeDO>> noticeList(@RequestBody PageParam param) {
        return BaseResult.success(noticeService.list(param));
    }

}
